package com.xpec.c4.game.datamanager;

import java.io.Serializable;

import com.xpec.c4.game.utility.GUID;

/**
 * 
 * @author Mike_Tung
 *
 */
public class BaseDataInfo implements Serializable{

	/**
	 * 
	 */
	private static final long serialVersionUID = 7984163483258526017L;

	/**
	 * 此數據在data center的id 
	 */
	protected int handle = DataManager.ERROR_HANDLE;
	
	/**
	 * 處理資料邏輯的地方會根據此ID, 對資料做對應的處理
	 * @see com.xpec.c4.game.datamanager.DataProcessIDs
	 */
	protected int messageType;
	
	/**
	 * 標記使用者对資料的操作方式
	 * @see com.xpec.c4.game.datamanager.DataModifyTypes
	 */
	protected int modifyType;
	
	/**
	 * 標記DataCenter对資料的维护方式
	 * @see com.xpec.c4.game.datamanager.DataManagerTypes
	 */
	protected int managerType;	
	
	/**
	 * 資料的屬性(存取權)
	 * @see com.xpec.c4.game.datamanager.DataAttribute
	 */
	protected int attributes;
	
	/**
	 * 查詢用的key
	 */
	protected GUID key;
	
	/**
	 * 資料來源, DC返回數據時標記此數據的來源
	 * @see com.xpec.c4.game.datamanager.DataSource
	 */
	protected int dataSource;	
	
	/**
	 * 處理結果
	 * @see com.xpec.c4.game.datamanager.ResultNo
	 */
	protected int resultCode;
	
	/**
	 * 底層使用, callback的索引值
	 */
	protected long snCallback;
	
	/**
	 * 这个视需求可以自行带不同的资料<br>
	 * 例如：<br>
	 * 取玩家资料时为Player Object<br>
	 * 切换owner时可为owner id<br>
	 */
	protected Object data;
	
	/**
	 * 
	 */
	protected String ownerID;

	
	public int getHandle() {
		return handle;
	}

	public void setHandle(int handle) {
		this.handle = handle;
	}

	public int getMessageType() {
		return messageType;
	}

	public void setMessageType(int messageType) {
		this.messageType = messageType;
	}

	public int getModifyType() {
		return modifyType;
	}

	public void setModifyType(int modifyType) {
		this.modifyType = modifyType;
	}

	public int getResultCode() {
		return resultCode;
	}

	public void setResultCode(int resultCode) {
		this.resultCode = resultCode;
	}

	public GUID getKey() {
		return key;
	}

	public void setKey(GUID key) {
		this.key = key;
	}

	public long getSnCallback() {
		return snCallback;
	}

	public void setSnCallback(long snCallback) {
		this.snCallback = snCallback;
	}

	public int getManagerType() {
		return managerType;
	}

	public void setManagerType(int managerType) {
		this.managerType = managerType;
	}

	public int getAttributes() {
		return attributes;
	}

	public void setAttributes(int attributes) {
		this.attributes = attributes;
	}

	public int getDataSource() {
		return dataSource;
	}

	public void setDataSource(int dataSource) {
		this.dataSource = dataSource;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}

	public String getOwnerID() {
		return ownerID;
	}

	public void setOwnerID(String ownerID) {
		this.ownerID = ownerID;
	}
	
}
